Fix voltage scaling for digital channels in neuropixelsGLX#96
Merged
stevevanhooser merged 2 commits intomainfrom Apr 7, 2026
Merged
Fix voltage scaling for digital channels in neuropixelsGLX#96stevevanhooser merged 2 commits intomainfrom
stevevanhooser merged 2 commits intomainfrom
Conversation
Digital word channels (DW in NIDQ, sync in imec) contain raw bit patterns, not ADC values. Applying the voltage conversion formula produced nonsensical values (e.g. 1.52e-4 instead of 1 for a set bit). Now digital channels pass through as double(raw) with no gain/range scaling applied. https://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
1.52e-4instead of1for a set bit). Digital channels now pass through asdouble(raw)with no gain/range scaling.build_nidq_gains) and imec (imroTbl) code paths now track which channels are digital and skip voltage scaling for those columns.Test plan
TestNeuropixelsGLXtests passtestDigitalChannelNotVoltageScaled— verifies DW channel returnsdouble(raw)unchangedtestMixedAnalogDigitalScaling— verifies analog columns are voltage-scaled while digital columns are nottestReadNidqScaledMatchesManual— verifies end-to-end scaled read matches manualsamples2voltshttps://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1